<div class="admin_media_meta_control">

<div class="div_media_meta_box_title">
    <label>Supported Media:</label><br/>
    <label>&nbsp;&nbsp;&nbsp;Images: .jpg/.jpeg , .gif , .png</label><br/>
    <label>&nbsp;&nbsp;&nbsp;Videos: .mp4/.m4v, .mov , .flv, .ogv , YouTube link</label>
</div>
<div class="div_media_meta_box_content">
    <table id="media_meta_table1" cellpadding="0" cellspacing="0"><tbody>
    <?php
        if(!empty($meta['media_meta_data1'])) {
            $custom_media_arr1 = $meta['media_meta_data1'];
            $num_tmp = 0;
        	foreach($custom_media_arr1 as $custom_media_code1) {
        	   if($custom_media_code1["mediatype"]=='image'&&$custom_media_code1["link"]!=''){
        	       echo '<tr>';
                    echo '<td>';
                    echo '<label>Image :</label>';
                    echo '</td>';
                    echo '<td>';
                    echo '<input type="text" name="_media_meta[media_meta_data1]['.$num_tmp.'][link]" value="'.stripslashes($custom_media_code1["link"]).'" id="_media_meta_'.$num_tmp.'" size="50%" />';
                    echo '<input type="hidden" name="_media_meta[media_meta_data1]['.$num_tmp.'][mediatype]" value="image"/>';
                    echo '</td>';
                    echo '<td>';
                    echo '<input class="upload_img_button"  id="_media_meta_'.$num_tmp.'" type="button" value="Upload Image" />';
                    echo '</td>';
                    echo '<td>';
                    echo '<input class="delete_img_button" type="button" value="Delete" onClick="jQuery(this).parent().parent().remove();"/>';
                    echo '</td>';
                  echo '</tr>';
                $num_tmp++;
              }else if($custom_media_code1["mediatype"]=='video'&&$custom_media_code1["link"]!=''){
                echo '<tr>';
                    echo '<td>';
                    echo '<label>Video :</label>';
                    echo '</td>';
                    echo '<td>';
                    echo '<input type="text" name="_media_meta[media_meta_data1]['.$num_tmp.'][link]" value="'.stripslashes($custom_media_code1["link"]).'" id="_media_meta_'.$num_tmp.'" size="50%" />';
                    echo '<input type="hidden" name="_media_meta[media_meta_data1]['.$num_tmp.'][mediatype]" value="video"/>';
                    echo '</td>';
                    echo '<td>';
                    echo '<input class="upload_img_button"  id="_media_meta_'.$num_tmp.'" type="button" value="Upload Video" />';
                    echo '</td>';
                    echo '<td>';
                    echo '<input class="delete_img_button" type="button" value="Delete" onClick="jQuery(this).parent().parent().remove();"/>';
                    echo '</td>';
                  echo '</tr>';
                  $num_tmp++;
              }
              
			}
        }
    ?>
     </tbody></table>
     <div class="div_media_meta_box_button">
     <!-- add_custom_content1 -->
        <input type="button" name="add_custom_content_image" value="Add New Image" id="add_custom_content_image"/>
        <input type="button" name="add_custom_content_video" value="Add New Video" id="add_custom_content_video"/>
        
        <div style="clear:both;"></div>
     </div>
</div><!-- End div_media_meta_box_content-->

</div> <!-- End admin_media_meta_control-->  
    
    
